1. Field of the Invention
The present invention relates to an image processing apparatus applicable for an apparatus that decodes image data that has been compressed and encoded corresponding to the MPEG format and to an image processing method thereof.
2. Description of the Related Art
An MPEG decoding apparatus requires a memory with a large storage capacity (for example, a frame memory that stores two frames) for decoding B picture. In recent years, as technologies for reducing the storage capacity of the frame memory, a method for writing a compressed decoded image to a frame memory of an MPEG decoding apparatus has been proposed as in "A study on reduced memory approach in MPEG2 decoder systems", ITE '96 1996 ITE Annual Convention, 23-4 and in "A study on frame memory reduction in MPEG2 decoder systems", THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS PROCEEDINGS OF THE 1996 IEICE GENERAL CONFERENCE, D-320.
In "A study on reduced memory approach in MPEG2 decoder systems", a technology for compressing and encoding an image as each pixel block composed of eight horizontal pixels corresponding to a one-dimensional DPCM (Differential Pulse Code Modulation) method is disclosed. In this technology, to easily read data from the memory in a motion compensating process, the compression ratio is fixed corresponding to a four-bit non-linear quantizing method. In this technology, the first one of eight pixels is encoded with eight bits. The rest of the pixels are encoded with four bits corresponding to DPCM method (by non-linearly quantizing the difference value with the previous pixel). In this technology, data of eight pixels composed of 64 bits can be encoded with (8 bits.times.1 pixel)+(4 bits.times.7 pixels)=36 bits. Thus, the data amount can be reduced to 0.56 times the original data amount.
However, in this technology, encoded data for bits of integer bytes cannot be obtained. (Assuming that 1 byte=8 bits, 36 bits=8 bits.times.4+4 bits). In other words, a fragment of four bits of a byte takes place. Thus, when the memory is accessed, the following special process is required.
Data is written or read as bytes to/from the memory. Thus, to write/read fragment data (four bits) to/from the memory without a space of four bits, fragment data of four bits is read from the frame memory. The fragment data of four bits is added to the first four bits of the next data so as to form one byte. The resultant one byte is written to the frame memory. Thus, a complicated process is required.
Difference values obtained in the DPCM process range from -255 to +255. However, when an image is considered in a small range of around eight pixels, most of difference in values concentrate in the vicinity of 0. On the other hand, the values of quantizing table are fixed so that the quantization errors are reduced on the average. Thus, a small difference value is quantized with an excessively large value. Thus, the quantizing errors increase.